using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class ReviewServiceUtil
    {
	
		static internal IReviewService CreateReviewService()
        {
            IReviewService target = IoCFactory.Resolve<IReviewService>();
            return target;
        }
				#region Review Test
 
        

		public static Review CreateReview()
        {
            Review result = GetReview();
            IReviewService service = CreateReviewService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Review CreateReviewFull()
        {
            Review result = GetReviewFull();
            IReviewService service = CreateReviewService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Review GetReview()
        {
            Review result = new Review();
			
            result.Date = DateTime.Now;

            result.Rating = 1;


            result.Comment = Guid.NewGuid().ToString();

        	result.Customer = CustomerServiceUtil.CreateCustomer(); 

        	result.Product = ProductServiceUtil.CreateProduct(); 
 
            return result;
            
        }
		
        public static Review GetReviewFull()
        {
            Review result = GetReview();
             
            return result;
            
        }
		
		#endregion Review Test
	

	}
}
